package com.kuaiyin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * JMX文件存储表（含操作人审计信息）
 * </p>
 *
 * @author ng
 * @since 2025-07-02
 */
@TableName("jmx_files")
public class JmxFiles implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 文件唯一ID，自动递增
     */
    @TableId(value = "file_id", type = IdType.AUTO)
    private Integer fileId;

    /**
     * 关联的测试计划ID
     */
    private Integer jmeterTestId;

    /**
     * 文件原始名称（包含扩展名）
     */
    private String fileName;

    /**
     * Minio中的存储路径，如/generated/123/20230501/xxx.jmx
     */
    private String filePath;

    /**
     * 文件大小（单位：字节）
     */
    private Integer fileSize;

    /**
     * 文件类型：1-系统生成，2-手动上传
     */
    private Integer fileType;

    /**
     * 文件描述信息
     */
    private String description;

    /**
     * Minio存储桶名称（符合DNS命名规范）
     */
    private String minioBucket;

    /**
     * Minio中的对象键（最大支持255字符）
     */
    private String minioObject;

    /**
     * 文件版本号（如v1.0.0）
     */
    private String version;

    /**
     * 状态：0-禁用，1-启用
     */
    private Integer isActive;

    /**
     * 创建人标识（用户名或用户ID）
     */
    private String createdBy;

    /**
     * 最后更新人标识（用户名或用户ID）
     */
    private String updatedBy;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    private LocalDateTime updatedAt;

    public Integer getFileId() {
        return fileId;
    }

    public void setFileId(Integer fileId) {
        this.fileId = fileId;
    }
    public Integer getJmeterTestId() {
        return jmeterTestId;
    }

    public void setJmeterTestId(Integer jmeterTestId) {
        this.jmeterTestId = jmeterTestId;
    }
    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }
    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }
    public Integer getFileSize() {
        return fileSize;
    }

    public void setFileSize(Integer fileSize) {
        this.fileSize = fileSize;
    }
    public Integer getFileType() {
        return fileType;
    }

    public void setFileType(Integer fileType) {
        this.fileType = fileType;
    }
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public String getMinioBucket() {
        return minioBucket;
    }

    public void setMinioBucket(String minioBucket) {
        this.minioBucket = minioBucket;
    }
    public String getMinioObject() {
        return minioObject;
    }

    public void setMinioObject(String minioObject) {
        this.minioObject = minioObject;
    }
    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }
    public Integer getIsActive() {
        return isActive;
    }

    public void setIsActive(Integer isActive) {
        this.isActive = isActive;
    }
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }
    public String getUpdatedBy() {
        return updatedBy;
    }

    public void setUpdatedBy(String updatedBy) {
        this.updatedBy = updatedBy;
    }
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        return "JmxFiles{" +
            "fileId=" + fileId +
            ", jmeterTestId=" + jmeterTestId +
            ", fileName=" + fileName +
            ", filePath=" + filePath +
            ", fileSize=" + fileSize +
            ", fileType=" + fileType +
            ", description=" + description +
            ", minioBucket=" + minioBucket +
            ", minioObject=" + minioObject +
            ", version=" + version +
            ", isActive=" + isActive +
            ", createdBy=" + createdBy +
            ", updatedBy=" + updatedBy +
            ", createdAt=" + createdAt +
            ", updatedAt=" + updatedAt +
        "}";
    }
}
